package com.shy.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class AutoWiredService {
    private ProductorService productorService;
    private StockService stockService;

    @Autowired
    public AutoWiredService(ProductorService productorService) {
        this.productorService = productorService;
    }

//    public AutoWiredService(ProductorService productorService, StockService stockService) {
//        this.productorService = productorService;
//        this.stockService = stockService;
//    }

    public StockService getStockService() {
        return stockService;
    }

    @Autowired
    public void setStockService(StockService stockService) {
        this.stockService = stockService;
    }

    @Override
    public String toString() {
        return "AutoWiredService{" +
                "productorService=" + productorService +
                ", stockService=" + stockService +
                '}';
    }
}
